// 库存管理接口
import request from "@/common/request.js";
const api = {
  account: "/account/",
  company: "/company/",
  role_permission: "/role_permission/",
  staff: "/staff/",
};
const syAccountApi = {
  get_company(params) {
    return request({
      url: api.company,
      method: "get",
      params,
    });
  },
  get_role_permission(params) {
    return request({
      url: api.role_permission,
      method: "get",
      params,
    });
  },
  get_staff(params) {
    return request({
      url: api.staff,
      method: "get",
      params,
    });
  },
  get_account(params) {
    return request({
      url: api.account,
      method: "get",
      params,
    });
  },

  account_detail(id) {
    return request({
      url: api.account + id,
      method: "get",
    });
  },

  post_account(data) {
    return request({
      url: api.account,
      method: "post",
      data,
    });
  },

  patch_account(data, id) {
    return request({
      url: api.account + id + "/",
      method: "patch",
      data,
    });
  },

  delete_account(id) {
    return request({
      url: api.account + id + "/",
      method: "delete",
    });
  },
};
export default syAccountApi;
